﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GameManager_2 : MonoBehaviour {

	public GameObject[] groupSquare;
	public Transform parent;
	public List<GameObject> listGroupSquare;
	private int number = 0;
	// Use this for initialization
	void Start () {
		listGroupSquare = new List<GameObject> ();
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	public int InitBox(int number)
	{
		GameObject insObj = Instantiate (Resources.Load ("Prefab/Square_" + number)) as GameObject;
		insObj.transform.position = groupSquare[number - 1].transform.position;
		insObj.transform.parent = parent;
		insObj.transform.localScale = new Vector3 (1,1,1);
		listGroupSquare.Add (insObj);
		number++;
		return listGroupSquare.Count;
	}
}
